﻿namespace FlexPlatform.DataModel.Validation.Generic_ValidationRules
{
    // req: this class has to extend ValidationRuleBase
    public class Pilot_GreaterThan : ValidationRuleBase
    {
        // req: no constructor required. 
        //      Not allowed to build a constructor with input parameter(s). The 'min value' will be provided when calling baseClass.Configure.
        //      When you need this value, use this.clsSpecificValue (this.* will refer to base. In VB was base.*)

        // You need to implement the metod ValueIsOk as:
        // private override bool ValueIsOk(dynamic proposedValue)

        // here you return TRUE if proposedValue is greater than (base)clsSpecificValue.

        // that's all

        protected sealed override bool ValueIsOk(dynamic proposedValue)
        {
            if (proposedValue < this.clsSpecificValue)
            {
                return false;
            }

            else
            {
                return true;
            }
        }

    }
}
